package com.titan.core.utils.comm;

import java.io.Closeable;
import java.io.IOException;

/**
 * @author 周成功
 * @email 86898837@qq.com
 * @date 2020年02月10日
 */
public class SocketUtils {
    public static void closeQuietly(final Closeable closeable) {
        if(closeable == null) {
            return;
        }
        try {
            closeable.close();
        } catch (final IOException ioe) {
            // ignore
        }
    }
    public static void closeQuietly(final Closeable... closeables) {
        if (closeables == null) {
            return;
        }
        for (final Closeable closeable : closeables) {
            closeQuietly(closeable);
        }
    }
}
